import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

import a from './module/a'

export default new Vuex.Store({
  state: {
    count:'10'
  },
  mutations: {
    SET_COUNT(state,num){
      state.count=num
    }
  },
  actions: {
    CountFun(context){
      context.commit('SET_COUNT',999)
    }
  },
  getters:{
    // getterNum(state,getter,rootState,rootGetter)
    getterNum(a,b,c,d){
      // console.log(a);
      // console.log(b);
      // console.log(c);
      console.log(d);

      return "尚甜"
    }
  },
  modules: {
    a
  }
})
